<?php

namespace Wilead\IArtistBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * User
 *
 * @ORM\Table(
 *      uniqueConstraints={@ORM\UniqueConstraint(name="resume_job", columns={"userId", "jobId"})}
 * )
 * @ORM\Entity(repositoryClass="Wilead\IArtistBundle\Repository\JobResumeRepository")
 * @UniqueEntity({"userResume", "Job"})
 */
class JobResume {

    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="UserResume")
     * @ORM\JoinColumn(name="userId", referencedColumnName="userId", nullable=false, onDelete="CASCADE")
     */
    private $userResume;

    /**
     * @ORM\ManyToOne(targetEntity="Job", inversedBy="Resumes")
     * @ORM\JoinColumn(name="jobId", referencedColumnName="id", nullable=false, onDelete="CASCADE")
     */
    private $Job;

    /**
     * @ORM\Column(type="boolean")
     */
    private $greenChannel = FALSE;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $created;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set greenChannel
     *
     * @param boolean $greenChannel
     * @return JobResume
     */
    public function setGreenChannel($greenChannel) {
        $this->greenChannel = $greenChannel;

        return $this;
    }

    /**
     * Get greenChannel
     *
     * @return boolean 
     */
    public function getGreenChannel() {
        return $this->greenChannel;
    }

    /**
     * Set created
     *
     * @param \DateTime $created
     * @return JobResume
     */
    public function setCreated($created) {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return \DateTime 
     */
    public function getCreated() {
        return $this->created;
    }

    /**
     * Set userResume
     *
     * @param \Wilead\IArtistBundle\Entity\UserResume $userResume
     * @return JobResume
     */
    public function setUserResume(\Wilead\IArtistBundle\Entity\UserResume $userResume) {
        $this->userResume = $userResume;

        return $this;
    }

    /**
     * Get userResume
     *
     * @return \Wilead\IArtistBundle\Entity\UserResume 
     */
    public function getUserResume() {
        return $this->userResume;
    }

    /**
     * Set Job
     *
     * @param \Wilead\IArtistBundle\Entity\Job $job
     * @return JobResume
     */
    public function setJob(\Wilead\IArtistBundle\Entity\Job $job) {
        $this->Job = $job;

        return $this;
    }

    /**
     * Get Job
     *
     * @return \Wilead\IArtistBundle\Entity\Job 
     */
    public function getJob() {
        return $this->Job;
    }

}